project("SimpleCanvas")

file(GLOB_RECURSE SRC_DIR_LIST "*.h" "*.hpp" "*.cpp")

add_library(${PROJECT_NAME} SHARED ${SRC_DIR_LIST})

set(SKIA_DIR "${REFERENCE_DIR}/skia" CACHE PATH "Skia 根目录")

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_link_directories(${PROJECT_NAME} PRIVATE "${SKIA_DIR}/out/Debug")
else()
    target_link_directories(${PROJECT_NAME} PRIVATE "${SKIA_DIR}/out/Release")
endif()


target_include_directories(${PROJECT_NAME} PRIVATE
"${SKIA_DIR}"
"${CMAKE_SOURCE_DIR}/yzrutil/main"
"${CMAKE_SOURCE_DIR}/SimpleDSP/main"
${PROJECT_SOURCE_DIR}
)

target_precompile_headers(${PROJECT_NAME} PRIVATE SimpleCanvas.h)

set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}")
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")

target_link_libraries(${PROJECT_NAME} PRIVATE yzrutil SimpleDSP skia)
